package org.spring.sample.controller;

import javax.validation.Valid;

import org.apache.log4j.Logger;
import org.spring.sample.dto.AdvertiserParam;
import org.spring.sample.dto.ResponseDTO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/index")
public class IndexRestFulController {
	
	private static final Logger log = Logger.getLogger(IndexController.class);
	
	@RequestMapping(value = "/advertiser", method = RequestMethod.POST, produces = "application/json" )
	public ResponseDTO creatAdvertiser(@RequestBody  @Valid  AdvertiserParam advertiserParam) {
		log.info("传入参数:"+advertiserParam);
		ResponseDTO dto = new ResponseDTO();
		dto.success("操作成功");
		return dto;
	}
}
